const state = {
  name: 'admin',
  isLoading: false, // loading状态
  setPrimaryColor: 'red', // 主题色
  contactsList: [], // 常用联系人
  contactsHeight: '378px', // 选择人员高度
  departmentDatas: [], // 组织结构数据
  roleList: [], // 角色结构数据
  allPeoples: [] // 所有人集合用于检索
};

const actions = {};

const mutations = {
  isLoading(state, data) {
    state.isLoading = data;
  },
  // 改变主题色
  setPrimaryColor(state, newValue) {
    state.setPrimaryColor = newValue;
  },
  // 常用联系人
  contactsList(state, newValue) {
    state.contactsList = newValue;
  },
  contactsHeight(state, newValue) {
    state.contactsHeight = newValue;
  },
  allPeoples(state, newValue) {
    state.allPeoples = newValue;
  },
  departmentDatas(state, newValue) {
    state.departmentDatas = newValue;
  },
  roleList(state, newValue) {
    state.roleList = newValue;
  }
};

export default {
  namespaced: true,
  state,
  actions,
  mutations
};
